package net.huashitong.scheduling.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.sirdc.modules.core.dao.GenericQuery;
import com.sirdc.modules.core.dao.StringDao;

import net.huashitong.scheduling.entity.BranchRanking;

@Repository
public class BranchRankingDao extends StringDao<BranchRanking> {
	public List<BranchRanking> queryByDate(String currentMonth){
		GenericQuery query = createQuery("obj");
		query.append(" and obj.currentMonth= :currentMonth order by cast(obj.cumulativeRatio as int) desc").setParam("currentMonth", currentMonth);
		return query.listResult();
	}

}
